#include #include #include using namespace std; //void main() //{ // ofstream fout; // //creates the file then writes to it // //fout.open("out.xls",ios_base::app); // string fileName; // do // { // cout << "file name? "; // getline(cin,fileName); // fout.open(fileName.c_str(),ios::_Noreplace); // } // while(fout.fail()); // // // int x = 0; // while(x < 100) // { // fout << x << ","; // fout << x * x << endl; // x++; // } // fout.close(); //} void main() { string line; ifstream fin("170example2.cpp"); ofstream fout("out.cpp"); while(!fin.eof()) { getline(fin,line); fout << line << endl; } fin.close(); fout.close(); }